package com.dex4d.ui.wallet.adapter;

import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import com.dex4d.ui.wallet.fragment.WalletTxFragment;

import java.util.ArrayList;

/**
 * 作者    LiQingyi
 * 时间    2018/11/27 10:14
 * 文件    dex4d-android
 * 描述
 */
public class TxPagerAdapter extends FragmentPagerAdapter {

    private String[] titles = new String[]{"ETH", "OMG", "ZRX", "SEELE"};

    private ArrayList<Fragment> fragments;

    public TxPagerAdapter(FragmentManager fm) {
        super(fm);
        fragments = new ArrayList<>();
        fragments.add(WalletTxFragment.newInstance("", ""));
        fragments.add(WalletTxFragment.newInstance("", ""));
        fragments.add(WalletTxFragment.newInstance("", ""));
        fragments.add(WalletTxFragment.newInstance("", ""));
    }


    @Override
    public Fragment getItem(int i) {
        return fragments.get(i);
    }


    @Override
    public int getCount() {
        return 4;
    }

    @Nullable
    @Override
    public CharSequence getPageTitle(int position) {
        return titles[position];
    }
}
